home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / MosaicSRC / src / mosaic.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  25.8 KB  |  832 lines

  1. // MDF - PORT FROM NCSA VERSION 2.1
  2.  
  3. /****************************************************************************
  4.  * NCSA Mosaic for the X Window System                        *
  5.  * Software Development Group                            *
  6.  * National Center for Supercomputing Applications                *
  7.  * University of Illinois at Urbana-Champaign                    *
  8.  * 605 E. Springfield, Champaign IL 61820                    *
  9.  * mosaic@ncsa.uiuc.edu                             *
  10.  *                                        *
  11.  * Copyright (C) 1993, Board of Trustees of the University of Illinois        *
  12.  *                                        *
  13.  * NCSA Mosaic software, both binary and source (hereafter, Software) is    *
  14.  * copyrighted by The Board of Trustees of the University of Illinois        *
  15.  * (UI), and ownership remains with the UI.                    *
  16.  *                                        *
  17.  * The UI grants you (hereafter, Licensee) a license to use the Software    *
  18.  * for academic, research and internal business purposes only, without a    *
  19.  * fee.  Licensee may distribute the binary and source code (if released)   *
  20.  * to third parties provided that the copyright notice and this statement   *
  21.  * appears on all copies and that no charge is associated with such        *
  22.  * copies.                                    *
  23.  *                                        *
  24.  * Licensee may make derivative works.    However, if Licensee distributes    *
  25.  * any derivative work based on or derived from the Software, then        *
  26.  * Licensee will (1) notify NCSA regarding its distribution of the        *
  27.  * derivative work, and (2) clearly notify users that such derivative        *
  28.  * work is a modified version and not the original NCSA Mosaic            *
  29.  * distributed by the UI.                            *
  30.  *                                        *
  31.  * Any Licensee wishing to make commercial use of the Software should        *
  32.  * contact the UI, c/o NCSA, to negotiate an appropriate license for such   *
  33.  * commercial use.  Commercial use includes (1) integration of all or        *
  34.  * part of the source code into a product for sale or license by or on        *
  35.  * behalf of Licensee to third parties, or (2) distribution of the binary   *
  36.  * code or source code to third parties that need it to utilize a        *
  37.  * commercial product sold or licensed by or on behalf of Licensee.        *
  38.  *                                        *
  39.  * UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR   *
  40.  * ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED          *
  41.  * WARRANTY.  THE UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE    *
  42.  * USERS OF THIS SOFTWARE.                            *
  43.  *                                        *
  44.  * By using or copying this Software, Licensee agrees to abide by the        *
  45.  * copyright law and all other applicable laws of the U.S. including, but   *
  46.  * not limited to, export control laws, and the terms of this license.        *
  47.  * UI shall have the right to terminate this license immediately by        *
  48.  * written notice upon Licensee's breach of, or non-compliance with, any    *
  49.  * of its terms.  Licensee may be held legally responsible for any        *
  50.  * copyright infringement that is caused or encouraged by Licensee's        *
  51.  * failure to abide by the terms of this license.                *
  52.  *                                        *
  53.  * Comments and questions are welcome and can be sent to            *
  54.  * mosaic-x@ncsa.uiuc.edu.                            *
  55.  ****************************************************************************/
  56.  
  57. #ifndef __MOSAIC_H__
  58. #define __MOSAIC_H__
  59.  
  60. /* --------------------------- SYSTEM INCLUDES ---------------------------- */
  61.  
  62. #include <stdio.h>
  63. #include <string.h>
  64. #include <ctype.h>
  65. #if !defined(VMS) && !defined(NeXT) && !defined(_AMIGA)
  66. #include <unistd.h>
  67. #endif
  68. #include <stdlib.h>
  69. /* #include <sys/types.h> */
  70.  
  71. #ifdef __sgi
  72. #include <malloc.h>
  73. #endif
  74.  
  75. #if !defined(_AMIGA)
  76. #include "Xmx.h"
  77. #endif
  78.  
  79. #if defined(_AMIGA)
  80. #include "XtoI.h"
  81. typedef void *XmxMenuRecord;
  82. #endif
  83.  
  84. /* ------------------------------------------------------------------------ */
  85. /* -------------------------------- ICONS --------------------------------- */
  86. /* ------------------------------------------------------------------------ */
  87. #define NUMBER_OF_FRAMES    25
  88.  
  89. /* ------------------------------------------------------------------------ */
  90. /* -------------------------------- MACROS -------------------------------- */
  91. /* ------------------------------------------------------------------------ */
  92. #ifndef _AMIGA
  93. #define MO_VERSION_STRING " FROM NCSA Mosaic V2.1 and 2.4 NOT FOR RELEASE"
  94. #else
  95. extern char *amosaic_version;
  96. extern char *amosaic_window_title;
  97. extern char *amosaic_about_version;
  98. extern char *mo_version_string;
  99. extern char *HTAppVersion;
  100. #endif
  101.  
  102. #define MO_HELP_ON_VERSION_DOCUMENT \
  103.   mo_assemble_help_url ("help-on-version-2.1.html")
  104. #define MO_DEVELOPER_ADDRESS "amosaic@insti.physics.sunysb.edu"
  105. #define MO_INSTRUMENTATION_ADDRESS "amosaic@insti.physics.sunysb.edu"
  106.  
  107. #ifndef DOCS_DIRECTORY_DEFAULT
  108. #define DOCS_DIRECTORY_DEFAULT \
  109.   "http://www.omnipresence.com/amosaic/2.0/"
  110. #endif
  111.  
  112. #ifndef HOME_PAGE_DEFAULT
  113. /* This must be a straight string as it is included into a struct;
  114.    no tricks. */
  115. #define HOME_PAGE_DEFAULT \
  116.   "http://www.omnipresence.com/amosaic/2.0/"
  117. #endif /* not HOME_PAGE_DEFAULT */
  118.  
  119. #ifndef WHATSNEW_PAGE_DEFAULT
  120. #define WHATSNEW_PAGE_DEFAULT \
  121.   mo_assemble_help_url ("whats-new.html")
  122. #endif /* not WHATSNEW_PAGE_DEFAULT */
  123.  
  124. #ifndef DEMO_PAGE_DEFAULT
  125. #define DEMO_PAGE_DEFAULT \
  126.   "http://www.ncsa.uiuc.edu/demoweb/demo.html"
  127. #endif /* not DEMO_PAGE_DEFAULT */
  128.  
  129. #ifndef HTMLPRIMER_PAGE_DEFAULT
  130. #define HTMLPRIMER_PAGE_DEFAULT \
  131.   "http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html"
  132. #endif /* not HTMLPRIMER_PAGE_DEFAULT */
  133.  
  134. #ifndef URLPRIMER_PAGE_DEFAULT
  135. #define URLPRIMER_PAGE_DEFAULT \
  136.   "http://www.ncsa.uiuc.edu/demoweb/url-primer.html"
  137. #endif /* not URLPRIMER_PAGE_DEFAULT */
  138.  
  139. #ifndef NETWORK_STARTING_POINTS_DEFAULT
  140. #define NETWORK_STARTING_POINTS_DEFAULT \
  141.   "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/StartingPoints/NetworkStartingPoints.html"
  142. #endif /* not NETWORK_STARTING_POINTS_DEFAULT */
  143.  
  144. #ifndef INTERNET_METAINDEX_DEFAULT
  145. #define INTERNET_METAINDEX_DEFAULT \
  146.   "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html"
  147. #endif /* not INTERNET_METAINDEX_DEFAULT */
  148.  
  149. #ifndef DOCUMENTS_MENU_SPECFILE
  150. #define DOCUMENTS_MENU_SPECFILE \
  151.   "s:documents.menu"
  152. #endif /* not DOCUMENTS_MENU_SPECFILE */
  153.  
  154. #ifndef GLOBAL_EXTENSION_MAP
  155. #define GLOBAL_EXTENSION_MAP "/usr/local/lib/mosaic/mime.types"
  156. #endif
  157. #ifndef GLOBAL_TYPE_MAP
  158. #define GLOBAL_TYPE_MAP "/usr/local/lib/mosaic/mailcap"
  159. #endif
  160.  
  161. #if defined(__hpux)
  162. #define MO_MACHINE_TYPE "HP-UX"
  163. #endif
  164. #if defined(__sgi)
  165. #define MO_MACHINE_TYPE "Silicon Graphics"
  166. #endif
  167. #if defined(ultrix)
  168. #define MO_MACHINE_TYPE "DEC Ultrix"
  169. #endif
  170. #if defined(_IBMR2)
  171. #define MO_MACHINE_TYPE "RS/6000 AIX"
  172. #endif
  173. #if defined(sun)
  174. #define MO_MACHINE_TYPE "Sun"
  175. #endif
  176. #if defined(__alpha)
  177. #define MO_MACHINE_TYPE "DEC Alpha"
  178. #endif
  179. #if defined(NEXT)
  180. #define MO_MACHINE_TYPE "NeXT BSD"
  181. #endif
  182. #if defined(cray)
  183. #define MO_MACHINE_TYPE "Cray"
  184. #endif
  185. #if defined(VMS)
  186. #define MO_MACHINE_TYPE "VMS"
  187. #endif
  188. #if defined(NeXT)
  189. #define MO_MACHINE_TYPE "NeXT"
  190. #endif
  191. #if defined(_AMIGA)
  192. #define MO_MACHINE_TYPE "Amiga"
  193. #endif
  194. #ifndef MO_MACHINE_TYPE
  195. #define MO_MACHINE_TYPE "Unknown Platform"
  196. #endif
  197.  
  198. #ifdef __hpux
  199. #define HAVE_AUDIO_ANNOTATIONS
  200. #else
  201. #if defined(__sgi) || defined(sun)
  202. #define HAVE_AUDIO_ANNOTATIONS
  203. #endif /* if */
  204. #endif /* ifdef */
  205.  
  206. #ifdef __hpux
  207. #define MO_SIGHANDLER_RETURNTYPE int
  208. #else /* not __hpux */
  209. #define MO_SIGHANDLER_RETURNTYPE void
  210. #endif
  211.  
  212. /* Be safe... some URL's get very long. */
  213. #define MO_LINE_LENGTH 2048
  214.  
  215. #define MO_MAX(x,y) ((x) > (y) ? (x) : (y))
  216. #define MO_MIN(x,y) ((x) > (y) ? (y) : (x))
  217.  
  218. /* Use builtin strdup when appropriate -- code duplicated in tcp.h. */
  219. #if defined(ultrix) || defined(VMS) || defined(NeXT)
  220. extern char *strdup ();
  221. #endif
  222.  
  223. #if defined(SYSV) || defined(SVR4) || defined(__svr4__) || defined(VMS) || (defined(_AMIGA) && defined (_STRICT_ANSI))
  224. #define bcopy(source, dest, count) memcpy(dest, source, count)
  225. #define bzero(b, len) memset(b, 0, len)
  226. #endif
  227.  
  228. #define public
  229. #define private static
  230.  
  231. /* ------------------------------------------------------------------------ */
  232. /* ------------------------------ MAIN TYPES ------------------------------ */
  233. /* ------------------------------------------------------------------------ */
  234.  
  235. /* ------------------------------ mo_window ------------------------------- */
  236.  
  237. /* mo_window contains everything related to a single Document View
  238.    window, including subwindow details. */
  239. typedef struct mo_window
  240. {
  241.   int id;
  242.   Widget base;
  243.  
  244.   /* Subwindows. */
  245.   Object *source_win;
  246.   Widget save_win;
  247.   Widget savebinary_win;  /* for binary transfer mode */
  248.   Object *open_win;
  249.   Widget mail_win;
  250.   Widget mailhot_win;
  251.   Widget edithot_win;
  252.   Widget mailhist_win;
  253.   Widget print_win;
  254.   Object *history_win;
  255.   Widget open_local_win;
  256.   Widget hotlist_win;
  257.   Widget whine_win;
  258.   Widget annotate_win;
  259.   Widget search_win;         /* internal document search */
  260.   Widget searchindex_win;    /* network index search */
  261. #ifdef HAVE_DTM
  262.   Widget dtmout_win;
  263. #endif
  264. #ifdef HAVE_AUDIO_ANNOTATIONS
  265.   Widget audio_annotate_win;
  266. #endif
  267.  
  268.   XmxMenuRecord *menubar;
  269.   Widget url_text;
  270.   Widget title_text;
  271.  
  272.   Widget searchindex_button;   /* pushbutton, says "Search Index" */
  273.   Widget searchindex_win_label, searchindex_win_text;
  274.   Widget searchindex_win_searchbut;
  275.  
  276.   HTMLGadClData *scrolled_win;    /* The data structure for the html gadget */
  277.   Object *HTML_Gad;                /* The actual gadget. Do not use it if you don't have to */
  278.   Object *view;
  279.   Widget bottom_form;
  280.   Widget tracker_label, logo;
  281.   Widget button_rc, back_button, forward_button, save_button,
  282.     clone_button, close_button, reload_button, open_button,
  283.     new_button;
  284.  
  285.   Widget home_button;
  286.  
  287.   int last_width;
  288.  
  289.   struct mo_node *history;
  290.   struct mo_node *current_node;
  291.   int reloading;
  292.  
  293.   char *target_anchor;
  294.  
  295.   /* Document source window. */
  296.   Object *source_text;
  297.  
  298.   int save_format; /* starts at 0 */
  299.   Object *format_optmenu;
  300.   Object *save_fname;
  301.   Object *save_requester;
  302.  
  303.   Object *open_text;
  304.  
  305.   /* Macro window */
  306.   Object *macro_win ;
  307.   Object *macro_req ;
  308.   Object *macro_string ;
  309.  
  310.   Widget mail_to_text;
  311.   Widget mail_subj_text;
  312.   XmxMenuRecord *mail_fmtmenu;
  313.   int mail_format;
  314.  
  315.   Widget mailhot_to_text;
  316.   Widget mailhot_subj_text;
  317.   Widget mailhist_to_text;
  318.   Widget mailhist_subj_text;
  319.  
  320.   Widget edithot_text;
  321.   int edithot_pos;
  322.  
  323.   Widget print_text;
  324.   XmxMenuRecord *print_fmtmenu;
  325.   int print_format;
  326.  
  327.   Widget history_list;
  328.  
  329.   Widget hotlist_list;
  330.  
  331.   Widget whine_text;
  332.  
  333.   int font_size;
  334.   int pretty;
  335.  
  336.   int underlines_snarfed;
  337.   int underlines_state;
  338.   /* Default values only, mind you. */
  339.   int underlines;
  340.   int visited_underlines;
  341.   Boolean dashed_underlines;
  342.   Boolean dashed_visited_underlines;
  343.  
  344. #ifdef HAVE_DTM
  345.   Widget dtmout_text;
  346. #endif /* HAVE_DTM */
  347.  
  348. #ifdef HAVE_AUDIO_ANNOTATIONS
  349.   Widget audio_start_button;
  350.   Widget audio_stop_button;
  351.   pid_t record_pid;
  352.   char *record_fnam;
  353. #endif
  354.  
  355.   Widget annotate_author;
  356.   Widget annotate_title;
  357.   Widget annotate_text;
  358.   Widget delete_button;
  359.   Widget include_fsb;
  360.   int annotation_mode;
  361.   int editing_id;
  362.  
  363.   char *cached_url;
  364.  
  365.   Widget search_win_text;
  366.   Widget search_caseless_toggle;
  367.   Widget search_backwards_toggle;
  368.   void *search_start;
  369.   void *search_end;
  370.  
  371.   int binary_transfer;
  372.   int delay_image_loads;
  373.  
  374.   struct mo_window *next;
  375.  
  376. #ifdef GRPAN_PASSWD
  377.   Widget passwd_label;
  378.   Widget annotate_passwd;
  379.   Widget passwd_toggle;
  380. #endif
  381.   XmxMenuRecord *pubpri_menu;
  382.   int pubpri;  /* one of mo_annotation_[public,private] */
  383.   XmxMenuRecord *audio_pubpri_menu;
  384.   int audio_pubpri;  /* one of mo_annotation_[public,private] */
  385. #ifdef NOPE_NOPE_NOPE
  386.   XmxMenuRecord *title_menu;
  387.   int title_opt;  /* mo_document_title or mo_document_url */
  388.   Widget annotate_toggle;
  389.   Widget crossref_toggle;
  390.   Widget checkout_toggle;
  391.   Widget checkin_toggle;
  392. #endif
  393. } mo_window;
  394.  
  395. /* ------------------------------- mo_node -------------------------------- */
  396.  
  397. /* mo_node is a component of the linear history list.  A single
  398.    mo_node will never be effective across multiple mo_window's;
  399.    each window has its own linear history list. */
  400. typedef struct mo_node
  401. {
  402.   char *title;
  403.   char *url;
  404.   char *ref;  /* how the node was referred to from a previous anchor,
  405.          if such an anchor existed. */
  406.   char *text;
  407.   char *texthead;   /* head of the alloc'd text -- this should
  408.                be freed, NOT text */
  409.   /* Position in the list, starting at 1; last item is
  410.      effectively 0 (according to the XmList widget). */
  411.   int position;
  412.  
  413.   /* The type of annotation this is (if any) */
  414.   int annotation_type;
  415.  
  416.   /* This is returned from HTMLPositionToId. */
  417.   int docid;
  418.  
  419.   /* This is returned from HTMLGetWidgetInfo. */
  420.   void *cached_stuff;
  421.  
  422.   struct mo_node *previous;
  423.   struct mo_node *next;
  424. } mo_node;
  425.  
  426. /* ------------------------------ mo_hotnode ------------------------------ */
  427.  
  428. /* mo_hotnode is a single item in a mo_hotlist. */
  429. typedef struct mo_hotnode
  430. {
  431.   char *title; /* cached */
  432.   char *url;
  433.   char *lastdate;
  434.   /* Position in the list; starting at 1... */
  435.   int position;
  436.  
  437.   struct mo_hotnode *previous;
  438.   struct mo_hotnode *next;
  439. } mo_hotnode;
  440.  
  441. /* ------------------------------ mo_hotlist ------------------------------ */
  442.  
  443. /* mo_hotlist is a list of URL's and (cached) titles that can be
  444.    added to and deleted from freely, and stored and maintained across
  445.    sessions. */
  446. typedef struct mo_hotlist
  447. {
  448.   mo_hotnode *nodelist;
  449.   /* Point to last element in nodelist for fast appends. */
  450.   mo_hotnode *nodelist_last;
  451.  
  452.   /* Filename for storing this hotlist to local disk; example is
  453.      $HOME/.mosaic-hotlist-default. */
  454.   char *filename;
  455.  
  456.   /* Name for this hotlist.  This is plain english. */
  457.   char *name;
  458.  
  459.   /* Flag set to indicate whether this hotlist has to be written
  460.      back out to disk at some point. */
  461.   int modified;
  462.  
  463.   /* In case we want to string together multiple hotlists... */
  464.   struct mo_hotlist *next;
  465. } mo_hotlist;
  466.  
  467. /* ------------------------------------------------------------------------ */
  468. /* ------------------------------ MISC TYPES ------------------------------ */
  469. /* ------------------------------------------------------------------------ */
  470.  
  471. typedef enum
  472. {
  473.   mo_fail = 0, mo_succeed
  474. } mo_status;
  475.  
  476. typedef enum
  477. {
  478.   mo_annotation_public = 0, mo_annotation_workgroup, mo_annotation_private
  479. } mo_pubpri_token;
  480.  
  481. typedef struct
  482. {
  483.   int default_width;
  484.   int default_height;
  485.   char *home_document;
  486.   char *sendmail_command;
  487.   char *xterm_command;
  488.   char *global_history_file;
  489.   char *default_hotlist_file;
  490.   char *private_annotation_directory;
  491.   char *annotation_server;
  492.   char *default_author_name;
  493.   char *download_dir;
  494.  
  495.   int colors_per_inlined_image;
  496.  
  497.   char *uncompress_command;
  498.   char *gunzip_command;
  499.  
  500.   char *record_command_location;
  501.   char *record_command;
  502.  
  503.   char *tmp_directory;
  504.  
  505.   char *full_hostname;
  506.  
  507.   int hdf_max_image_dimension;
  508.   int hdf_max_displayed_datasets;
  509.   int hdf_max_displayed_attributes;
  510.  
  511.   char *docs_directory;
  512.  
  513.   char *documents_menu_specfile;
  514.  
  515.   int max_wais_responses;
  516.  
  517.   char *global_extension_map;
  518.   char *personal_extension_map;
  519.   char *global_type_map;
  520.   char *personal_type_map;
  521.  
  522.   int twirl_increment;
  523.  
  524.   int image_cache_size;
  525.  
  526.   Boolean use_global_history;
  527.   Boolean display_urls_not_titles;
  528.   Boolean confirm_exit;
  529.   Boolean default_fancy_selections;
  530.   Boolean annotations_on_top;
  531.   Boolean track_visited_anchors;
  532.   Boolean catch_prior_and_next;
  533.   Boolean hdf_power_user;
  534.  
  535.   Boolean reload_reloads_images;
  536.   Boolean simple_interface;
  537.   Boolean larry_bitmaps;
  538.   Boolean delay_image_loads;
  539.  
  540.   Boolean use_default_extension_map;
  541.   Boolean use_default_type_map;
  542.   Boolean twirling_transfer_icon;
  543.   Boolean protect_me_from_myself;
  544.  
  545.   Boolean reverse_inlined_bitmap_colors;
  546.  
  547.   Boolean confirm_delete_annotation;
  548.   Boolean tweak_gopher_types;
  549.  
  550.   /* If True, we can't call gethostbyname to find out who we are. */
  551.   Boolean gethostbyname_is_evil;
  552.  
  553.   Boolean auto_place_windows;
  554.   Boolean initial_window_iconic;
  555.  
  556.   Boolean track_pointer_motion;
  557.   Boolean track_full_url_names;
  558.  
  559.   char *mail_filter_command;
  560.  
  561.   char *font, *italicfont, *boldfont, *h1font, *h2font, *h3font, *h4font;
  562.   char *h5font, *h6font, *fixedfont, *addressfont, *listingfont, *plainfont;
  563.  
  564.     Boolean image_buttons;
  565.     Boolean isindex_to_form;
  566.     Boolean title_to_window;
  567.  
  568.     long u_anchor;
  569.     long f_anchor;
  570.     long a_anchor;
  571.  
  572. } AppData, *AppDataPtr;
  573.  
  574.  
  575. /* ---------------------------- a few globals ----------------------------- */
  576.  
  577. extern AppData Rdata;
  578. #if !defined(_AMIGA)
  579. extern Display *dsp;
  580. #endif
  581. /* ------------------------------- menubar -------------------------------- */
  582.  
  583. typedef enum
  584. {
  585.   mo_reload_document = 50, mo_reload_document_and_images,
  586.   mo_refresh_document, mo_clear_image_cache,
  587.   mo_document_source, mo_search,
  588.   mo_open_document, mo_open_local_document, mo_save_document,
  589.   mo_mail_document, mo_tex_document,
  590.   mo_new_window, mo_clone_window,
  591.   mo_close_window, mo_exit_program,
  592.   mo_home_document, mo_ncsa_document,
  593.   mo_mosaic_manual, mo_mosaic_demopage,
  594.   mo_back, mo_forward, mo_history_list,
  595.   mo_clear_global_history,
  596.   mo_network_starting_points, mo_internet_metaindex, mo_search_index,
  597.   mo_large_fonts, mo_regular_fonts, mo_small_fonts,
  598.   mo_large_helvetica, mo_regular_helvetica, mo_small_helvetica,
  599.   mo_large_newcentury, mo_regular_newcentury, mo_small_newcentury,
  600.   mo_large_lucidabright, mo_regular_lucidabright, mo_small_lucidabright,
  601.   mo_help_about, mo_help_onwindow, mo_help_onversion, mo_help_faq,
  602.   mo_whine, mo_help_html, mo_help_url,
  603.   mo_whats_new,
  604.   mo_annotate,
  605. #ifdef HAVE_AUDIO_ANNOTATIONS
  606.   mo_audio_annotate,
  607. #endif
  608.   mo_annotate_edit, mo_annotate_delete,
  609.   mo_checkout, mo_checkin,
  610.   mo_fancy_selections,
  611.   mo_default_underlines, mo_l1_underlines, mo_l2_underlines, mo_l3_underlines,
  612.   mo_no_underlines, mo_binary_transfer,
  613.   mo_re_init, mo_delay_image_loads, mo_expand_images_current, mo_about,
  614.   mo_macro, mo_macro_1, mo_macro_2, mo_macro_3, mo_macro_4, mo_macro_5,
  615.   mo_macro_6, mo_macro_7, mo_macro_8, mo_macro_9, mo_macro_10,
  616.   mo_add_hot_list, mo_jump_hot_list, mo_print_document,
  617.   mo_isindex_to_form, mo_form_notify, mo_image_buttons,
  618.   mo_buttons_text,mo_buttons_image,mo_buttons_imagetext,
  619.   mo_load_amigahome, mo_load_amosaichome,
  620.   mo_url_to_clipboard,
  621.   mo_show_form_images,
  622. } mo_token;
  623.  
  624.  
  625. /* ------------------------------------------------------------------------ */
  626. /* ------------------------------ PROTOTYPES ------------------------------ */
  627. /* ------------------------------------------------------------------------ */
  628.  
  629. /* annotate.c */
  630. extern mo_status mo_post_annotate_win
  631.   (mo_window *win, int, int, char *, char *, char *, char *);
  632. extern char *mo_fetch_annotation_links (char *, int);
  633. extern mo_status mo_is_editable_annotation (mo_window *, char *);
  634. extern mo_status mo_delete_annotation (mo_window *, int);
  635. extern mo_status mo_delete_group_annotation (mo_window *, char *);
  636.  
  637. #ifdef HAVE_AUDIO_ANNOTATIONS
  638. /* audan.c */
  639. extern mo_status mo_audio_capable (void);
  640. extern mo_status mo_post_audio_annotate_win (mo_window *);
  641. #endif
  642.  
  643. /* globalhist.c */
  644. extern mo_status mo_been_here_before_huh_dad (char *);
  645. extern mo_status mo_here_we_are_son (char *);
  646. extern mo_status mo_init_global_history (void);
  647. extern mo_status mo_wipe_global_history (mo_window *);
  648. extern mo_status mo_setup_global_history (void);
  649. extern mo_status mo_write_global_history (void);
  650. extern void *mo_fetch_cached_image_data (char *);
  651. extern void *mo_fetch_cached_local_name (char *);
  652. extern mo_status mo_cache_data (char *, void *, int);
  653. extern mo_status mo_zap_cached_images_here (mo_window *);
  654. extern mo_status mo_flush_image_cache (mo_window *);
  655. extern mo_status mo_set_image_cache_nuke_threshold (void);
  656.  
  657. /* grpan.c */
  658. extern char *mo_fetch_grpan_links (char *url);
  659. extern mo_status mo_is_editable_grpan (char *);
  660. extern mo_status mo_audio_grpan (char *url, char *title, char *author,
  661.                    char *data, int len);
  662. extern mo_status mo_new_grpan (char *url, char *title, char *author,
  663.                    char *text);
  664. extern mo_status mo_modify_grpan (char *url, char *title, char *author,
  665.                    char *text);
  666. extern mo_status mo_delete_grpan (char *url);
  667. extern mo_status mo_grok_grpan_pieces
  668.   (char *, char *, char **, char **, char **, int *, char **);
  669.  
  670. /* grpan-www.c */
  671. extern char *grpan_doit (char *, char *, char *, int, char **);
  672.  
  673. /* gui.c */
  674. extern mo_window *mo_next_window (mo_window *);
  675. extern mo_window *mo_fetch_window_by_id (int);
  676. extern mo_status mo_add_window_to_list (mo_window *);
  677. extern char *mo_assemble_help_url (char *);
  678. extern mo_status mo_busy (void);
  679. extern mo_status mo_not_busy (void);
  680. extern mo_status mo_redisplay_window (mo_window *);
  681. extern mo_status mo_set_current_cached_win (mo_window *);
  682. extern mo_status mo_set_dtm_menubar_functions (mo_window *);
  683. extern mo_status mo_delete_window (mo_window *);
  684. extern mo_window *mo_open_window (Widget, char *, mo_window *);
  685. extern mo_window *mo_duplicate_window (mo_window *);
  686. extern mo_window *mo_open_another_window (mo_window *, char *, char *, char *);
  687. extern mo_status mo_open_initial_window (void);
  688. extern void mo_gui_notify_progress (char *);
  689. extern int mo_gui_check_icon (int);
  690. extern void mo_gui_clear_icon (void);
  691. extern void mo_gui_done_with_icon (void);
  692. #ifdef HAVE_DTM
  693. extern mo_status mo_register_dtm_blip (void);
  694. #endif
  695.  
  696. extern void mo_do_gui (int, char **);
  697.  
  698. /* gui-dialogs.c */
  699. extern mo_status mo_post_save_window (mo_window *);
  700. /* called from libwww */
  701. extern void rename_binary_file (char *);
  702. extern mo_status mo_post_open_local_window (mo_window *);
  703. extern mo_status mo_post_open_window (mo_window *);
  704. #ifdef HAVE_DTM
  705. extern mo_status mo_send_document_over_dtm (mo_window *);
  706. extern mo_status mo_post_dtmout_window (mo_window *);
  707. #endif
  708. extern mo_status mo_post_mail_window (mo_window *);
  709. extern mo_status mo_post_print_window (mo_window *);
  710. extern mo_status mo_post_source_window (mo_window *);
  711. extern mo_status mo_post_search_window (mo_window *);
  712.  
  713. /* gui-documents.c */
  714. extern mo_status mo_back_impossible (mo_window *win);
  715. extern mo_status mo_forward_impossible (mo_window *win);
  716. extern mo_status mo_set_win_current_node (mo_window *, mo_node *);
  717. extern mo_status mo_reload_window_text (mo_window *, int);
  718. extern mo_status mo_refresh_window_text (mo_window *);
  719. extern mo_status mo_load_window_text (mo_window *, char *, char *);
  720. extern mo_status mo_duplicate_window_text (mo_window *, mo_window *);
  721. extern mo_status mo_access_document (mo_window *, char *);
  722. //added by SB:
  723. extern mo_status mo_post_access_document (mo_window *, char *,char *, char *);
  724.  
  725. /* gui-menubar.c */
  726. extern mo_status mo_set_fancy_selections_toggle (mo_window *);
  727. extern mo_status mo_set_fonts (mo_window *, int);
  728. extern mo_status mo_set_underlines (mo_window *, int);
  729. extern XmxMenuRecord *mo_make_document_view_menubar (Widget);
  730. extern void do_menubar(mo_window *, int); /* MDF */
  731.  
  732. /* history.c */
  733. extern mo_status mo_free_node_data (mo_node *);
  734. extern mo_status mo_kill_node (mo_window *, mo_node *);
  735. extern mo_status mo_kill_node_descendents (mo_window *, mo_node *);
  736. extern mo_status mo_add_node_to_history (mo_window *, mo_node *);
  737. extern char *mo_grok_title (mo_window *, char *, char *);
  738. extern mo_status mo_record_visit (mo_window *, char *, char *,
  739.                   char *, char *);
  740. extern mo_status mo_back_node (mo_window *);
  741. extern mo_status mo_forward_node (mo_window *);
  742. extern mo_status mo_visit_position (mo_window *, int);
  743. extern mo_status mo_dump_history (mo_window *);
  744. extern mo_status mo_post_history_win (mo_window *);
  745.  
  746. /* hotlist.c */
  747. extern mo_hotlist *mo_read_hotlist (char *);
  748. extern mo_hotlist *mo_new_hotlist (char *, char *);
  749. extern mo_status mo_write_hotlist (mo_hotlist *);
  750. extern mo_status mo_dump_hotlist (mo_hotlist *);
  751. extern mo_status mo_setup_default_hotlist (void);
  752. extern mo_status mo_write_default_hotlist (void);
  753. extern mo_status mo_post_hotlist_win (mo_window *);
  754. extern mo_status mo_add_node_to_default_hotlist (mo_node *);
  755.  
  756. /* img.c */
  757. extern mo_status mo_free_image_data (void *);
  758. extern mo_status mo_register_image_resolution_function (mo_window *);
  759.  
  760. /* main.c */
  761. extern void mo_exit (void);
  762.  
  763. /* mo-www.c */
  764. extern char *mo_pull_er_over (char *, char **);
  765. extern mo_status mo_pull_er_over_virgin (char *, char *);
  766. extern char *mo_tmpnam (void);
  767. extern char *mo_get_html_return (char **);
  768. extern char *mo_convert_newlines_to_spaces (char *);
  769. extern mo_status mo_re_init_formats (void);
  770.  
  771. extern char *mo_url_canonicalize (char *, char *);
  772. extern char *mo_url_canonicalize_keep_anchor (char *, char *);
  773. extern char *mo_url_canonicalize_local (char *);
  774. extern char *mo_url_to_unique_document (char *);
  775. extern char *mo_url_extract_anchor (char *);
  776. extern char *mo_url_extract_access (char *, char *);
  777.  
  778. extern void application_user_feedback (char *);
  779. extern char *mo_escape_part (char *);
  780. extern char *mo_unescape_part (char *);
  781.  
  782. #ifdef HAVE_DTM
  783. /* mo-dtm.c */
  784. extern mo_status mo_dtm_in (char *);
  785. extern mo_status mo_dtm_out (char *);
  786. extern mo_status mo_dtm_out_active_p (void);
  787. extern mo_status mo_dtm_poll_and_read (void);
  788. extern mo_status mo_dtm_send_text (mo_window *, char *, char *);
  789. extern mo_status mo_dtm_disconnect (void);
  790. #endif
  791.  
  792. #ifdef HAVE_HDF
  793. /* mo-hdf.c */
  794. extern char *mo_hdf_fetch_local_filename (char *);
  795. extern char *mo_decode_internal_reference (char *, char *, char *);
  796. extern char *mo_decode_hdfref (char *url, char *target);
  797. #ifdef HAVE_DTM
  798. extern mo_status mo_do_hdf_dtm_thang (char *, char *);
  799. #endif /* HAVE_DTM */
  800. #endif /* HAVE_HDF */
  801.  
  802. /* pan.c */
  803. extern mo_status mo_setup_pan_list (void);
  804. extern mo_status mo_write_pan_list (void);
  805. extern mo_status mo_new_pan (char *, char *, char *, char *);
  806. extern char *mo_fetch_pan_links (char *url, int);
  807. extern mo_status mo_delete_pan (int);
  808. extern mo_status mo_modify_pan (int, char *, char *, char *);
  809. extern mo_status mo_is_editable_pan (char *);
  810. extern mo_status mo_grok_pan_pieces
  811.   (char *, char *, char **, char **, char **, int *, char **);
  812. extern int mo_next_pan_id (void);
  813.  
  814. /* picread.c */
  815. // extern unsigned char *ReadBitmap (char *, int *, int *, XColor *, int *);
  816.  
  817. /* pixmaps.c */
  818. // extern void AnimatePixmapInWidget(Widget, Pixmap);
  819. // extern void MakeAnimationPixmaps(Widget);
  820.  
  821. /* whine.c */
  822. extern mo_status mo_post_whine_win (mo_window *);
  823. extern mo_status mo_send_mail_message (char *, char *, char *, char *, char *);
  824. extern FILE *mo_start_sending_mail_message (char *, char *, char *, char *);
  825. extern mo_status mo_finish_sending_mail_message (void);
  826.  
  827. /* ----------------------------- END OF FILE ------------------------------ */
  828.  
  829. extern void fire_er_up (int, char **);
  830.  
  831. #endif /* not __MOSAIC_H__ */
  832.